package ge.tsu.java.project.commons;

import java.io.IOException;
import java.io.Serializable;

public interface Protocol {
	
	int available() throws IOException;
	
	void writeMessage(Message message) throws IOException;

	void writeSerializable(Serializable serializable) throws IOException;
	
	void writeByte(byte value) throws IOException;
	
	void writeString(String value) throws IOException;

	void writeInt(int value) throws IOException;

	void writeLong(long value) throws IOException;

	void writeFloat(float value) throws IOException;

	void writeDouble(double value) throws IOException;

	void writeBoolean(boolean value) throws IOException;
	
	void write(byte[] arr, int off, int len) throws IOException;

	Message readMessage() throws IOException;

	Serializable readSerializable() throws IOException;
	
	byte readByte() throws IOException;
	
	String readString() throws IOException;

	int readInt() throws IOException;

	long readLong() throws IOException;

	float readFloat() throws IOException;

	double readDouble() throws IOException;

	boolean readBoolean() throws IOException;
	
	int read(byte[] arr, int off, int len) throws IOException;

}
